An image pick-up apparatus such as a camera has conventionally employed a technique for detecting a prescribed image pick-up target from a picked-up image of a subject (picked-up image). For example, in an augmented reality technique, a technique for detecting a marker by subjecting a marker (a search target) included in an image picked up by a camera to image recognition processing (a marker detection technique) has been known.
An exemplary embodiment provides an information processing program, an information processing system, an information processing apparatus, and an information processing method, capable of providing more visual effects for having a user actually feel augmented reality by making use of a detected marker (a search target).
An exemplary embodiment provides a non-transitory storage medium encoded with a computer readable information processing program and executable by a computer of an information processing apparatus. The information processing apparatus is connected to an image pick-up apparatus and a display. The information processing program includes image obtaining instructions, search target detection instructions, shape recognition instructions, event occurrence instructions, virtual image generation instructions, and display control instructions. The image obtaining instructions cause the computer to obtain an image of a subject picked up by the image pick-up apparatus. The search target detection instructions cause the computer to detect a search target from the image of the subject obtained in accordance with the image obtaining instructions. The shape recognition instructions cause the computer to recognize a shape of the search target detected in accordance with the search target detection instructions. The event occurrence instructions cause the computer to cause an event to occur in a virtual space in accordance with the shape of the search target recognized in accordance with the shape recognition instructions. The virtual image generation instructions cause the computer to generate a virtual image by shooting the event that occurs in accordance with the event occurrence instructions with a virtual camera arranged in the virtual space. The display control instructions cause the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event is caused to occur in the virtual space in accordance with the recognized shape of the search target, more visual effects for having the user actually feel augmented reality by utilizing the search target can be provided.
In an exemplary embodiment, the event occurrence instructions are adapted to cause the event to occur in accordance with the shape of the search target when a result of detection from a sensor detecting an orientation of the information processing apparatus indicates a prescribed orientation of the information processing apparatus.
According to the exemplary embodiment, since an event is prevented from occurring depending on a result of detection from the sensor detecting an orientation or motion of the information processing apparatus, an event can be prevented from occurring due to change in recognized shape of the search target caused by movement of the information processing apparatus by the user. Namely, the user can be caused to perform an operation as a developer intends to desirably cause an event to occur in accordance with a shape of the search target changed by movement of the search target.
In an exemplary embodiment, the shape recognition instructions are adapted to recognize the shape of the search target based on an orientation of a vector extending from a center of the search target toward one side of the search target in the image of the subject.
According to the exemplary embodiment, simply by calculating an orientation of the vector extending from the center of the search target to one side of the search target in the image of the subject, deformation of the shape of the search target can easily be recognized.
In an exemplary embodiment, the event occurrence instructions are adapted to cause a first event to occur when the search target is successfully detected in accordance with the search target detection instructions and to cause a second event to occur when the shape of the search target recognized in accordance with the shape recognition instructions deforms to a prescribed shape subsequent to occurrence of the first event.
According to the exemplary embodiment, since a first event is caused to occur when the search target is successfully detected and a second event is caused to occur when the shape of the search target deforms to a prescribed shape, more visual effects for having the user actually feel augmented reality by further utilizing the search target can be provided.
In an exemplary embodiment, the event that occurred in accordance with the event occurrence instructions includes arrangement of an object in a prescribed shape in the virtual space, and the virtual image generation instructions are adapted to generate the virtual image by shooting the object in the prescribed shape with the virtual camera.
According to the exemplary embodiment, since an object in a prescribed shape is displayed in accordance with an event, as compared with a case where an object is simply displayed at a position corresponding to the search target, more visual effects for having the user actually feel augmented reality can be provided.
In an exemplary embodiment, the event that occurred in accordance with the event occurrence instructions includes arrangement of a plate-shaped polygon in the virtual space, and the virtual image generation instructions are adapted to generate the virtual image by mapping a texture on the plate-shaped polygon and shooting the polygon with the virtual camera.
According to the exemplary embodiment, since a virtual image obtained by mapping a texture on the plate-shaped polygon arranged in the virtual space is generated, more visual effects for having the user actually feel augmented reality can be provided.
In an exemplary embodiment, the information processing program further includes position calculation instructions for calculating positional relation between the image pick-up apparatus and the search target based on the image of the subject and virtual camera arrangement instructions for arranging the virtual camera in accordance with the positional relation calculated in accordance with the position calculation instructions.
According to the exemplary embodiment, since an image picked up by a virtual camera arranged in accordance with positional relation between the image pick-up apparatus and the search target is generated as the virtual image, such display as if an event occurred in a real world can be provided and hence more visual effects for having the user actually feel augmented reality can be provided.
An exemplary embodiment provides an information processing apparatus connected to an image pick-up apparatus and a display. The information processing apparatus includes an image obtaining unit, a search target detection unit, a shape recognition unit, an event occurrence unit, a virtual image generation unit, and a display control unit. The image obtaining unit obtains an image of a subject picked up by the image pick-up apparatus. The search target detection unit detects a search target from the image of the subject obtained by the image obtaining unit. The shape recognition unit recognizes a shape of the search target detected by the search target detection unit. The event occurrence unit causes an event to occur in a virtual space in accordance with the shape of the search target recognized by the shape recognition unit. The virtual image generation unit generates a virtual image by shooting the event that occurs by means of the event occurrence unit with a virtual camera arranged in the virtual space. The display control unit causes the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event is caused to occur in the virtual space in accordance with the recognized shape of the search target, more visual effects for having the user actually feel augmented reality by utilizing the search target can be provided.
An exemplary embodiment provides an information processing method processed by a control unit of an information processing apparatus connected to an image pick-up apparatus and a display. The information processing method includes the steps of obtaining an image of a subject picked up by the image pick-up apparatus, detecting a search target from the obtained image of the subject, recognizing a shape of the detected search target, causing an event to occur in a virtual space in accordance with the recognized shape of the search target, generating a virtual image by shooting the event that occurs with a virtual camera arranged in the virtual space, and causing the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event is caused to occur in the virtual space in accordance with the recognized shape of the search target, more visual effects for having the user actually feel augmented reality by utilizing the search target can be provided.
An exemplary embodiment provides an information processing system. The information processing system includes a search target arranged in a subject, an image pick-up apparatus for picking up an image of the subject, an information processing apparatus connected to the image pick-up apparatus, and a display connected to the information processing apparatus. The information processing apparatus includes an image obtaining unit for obtaining the image of the subject picked up by the image pick-up apparatus, a search target detection unit for detecting the search target from the image of the subject obtained by the image obtaining unit, a shape recognition unit for recognizing a shape of the search target detected by the search target detection unit, an event occurrence unit for causing an event to occur in a virtual space in accordance with the shape of the search target recognized by the shape recognition unit, a virtual image generation unit for generating a virtual image by shooting the event that occurs by means of the event occurrence unit with a virtual camera arranged in the virtual space, and a display control unit for causing the display to display the virtual image such that it is visually recognized by a user as superimposed on the image of the subject or on the subject seen through a screen of the display.
According to the exemplary embodiment, since an event is caused to occur in the virtual space in accordance with the recognized shape of the search target, more visual effects for having the user actually feel augmented reality by utilizing the search target can be provided.
The foregoing and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.